import request from '@/utils/request'

// 创建钱包
export function createWallet(data) {
  return request({
    url: '/lfd/wallet/create',
    method: 'post',
    data: data
  })
}

// 更新钱包
export function updateWallet(data) {
  return request({
    url: '/lfd/wallet/update',
    method: 'put',
    data: data
  })
}

// 删除钱包
export function deleteWallet(id) {
  return request({
    url: '/lfd/wallet/delete?id=' + id,
    method: 'delete'
  })
}

// 获得钱包
export function getWallet(id) {
  return request({
    url: '/lfd/wallet/get?id=' + id,
    method: 'get'
  })
}

// 获得钱包分页
export function getWalletPage(query) {
  return request({
    url: '/lfd/wallet/page',
    method: 'get',
    params: query
  })
}

// 导出钱包 Excel
export function exportWalletExcel(query) {
  return request({
    url: '/lfd/wallet/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
